package com.pattern.design.designpattern.Watcher;

import com.pattern.design.designpattern.MainActivity;

import java.util.Observable;
import java.util.Observer;

/**
 * author:harisucici on 2018/10/10 10:56
 * email:harisucici@gmail.com
 * name:
 * todo:
 */
public class Watcher implements Observer {
    private String name;

    /**
     * Instantiates a new Watcher.
     *
     * @param s the s
     */
    public Watcher(String s){
        this.name = s;
    }

    @Override
    public void update(Observable observable, Object o) {
        MainActivity.systemOut(name+":"+o);
    }
}
